home *** CD-ROM | disk | FTP | other *** search
- program dcompose;
-
- uses
- {$IFDEF Ver90}
- { This unit sets the global variable IsLibrary to true at
- the outset; this suppresses the creation of the Application.Handle
- and thus supresses the icon on the task bar. Set IsLibrary back
- to false at earliest opportunity in source below. Not needed under
- Delphi 3, which supresses icon itself somehow. (it probably does
- this by either not incuding WS_VISIBLE in the CreateWindow call,
- or by not showing the window with ShowWinNoAnimate; compare
- Application.CreateHandle for D2 and D3)
- However, see notes in TDCompForm.AppOnMessage
- about the difference in where the message broadcast to toplevel
- windows from the DLL will wind up.}
- RunFirst in 'RunFirst.pas',
- {$ENDIF}
- Forms,
- Windows,
- dcompfrm in 'DCompfrm.PAS' {DCompForm}; {DCompForm}
-
- {$R *.RES}
-
- const
- MutexName = 'Run only one DCompose';
-
- var
- MyMutex : THandle;
-
- begin
- {$IFDEF Ver90}
- IsLibrary := False;
- {$ENDIF}
-
- MyMutex := CreateMutex(nil,true,MutexName);
- if (MyMutex = 0) or (GetLastError = ERROR_ALREADY_EXISTS) then
- Halt;
- Application.ShowMainForm := False;
- Application.CreateForm(TDCompForm, DCompForm);
- Application.Run;
- CloseHandle(MyMutex);
- end.
-
-